import React from 'react';
import { Router, Route, IndexRedirect, IndexRoute, hashHistory } from 'react-router';
import App from './containers/App';
var commonOnEnter = function (nextState, replace) {
    var a;
};
const routeConfig = {
    component: App,
    path: '/',
    indexRoute: {
        onEnter: commonOnEnter,
        path: '',
        getComponent(location, cb) {
            require.ensure([], (require) => {
                cb(null, require('./containers/Dashboard'))
            })
        }
    },
    childRoutes: [
        {
            onEnter: commonOnEnter,
            path: 'statistics',
            getComponent(location, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./containers/Statistics'))
                })
            }
        },
        {
            onEnter: commonOnEnter,
            path: 'dashboard',
            getComponent(location, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./containers/Dashboard'))
                })
            }
        },
        {
            onEnter: commonOnEnter,
            path: 'config',
            getComponent(location, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./containers/Config'))
                })
            }
        },
        {
            onEnter: commonOnEnter,
            path: 'config/:id',
            getComponent(location, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./containers/Config'))
                })
            }
        },
        {
            onEnter: commonOnEnter,
            path: '*',
            getComponent(location, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./containers/NotFound'))
                })
            }
        }
    ]
}

export default React.createClass({
    render() {
        return (
            <Router routes={routeConfig} history={hashHistory}/>
        );
    }
});
